package com.shenda.api.web;

import java.util.concurrent.CompletableFuture;

import com.swak.annotation.PostMapping;
import com.swak.annotation.RestApi;
import com.swak.entity.Result;
import com.swak.ui.Event;
import com.swak.ui.Events;

/**
 * 系统级别
 * 
 * @author lifeng
 */
@RestApi(path = "/api/admin/app", value = "adminAppApi")
public class AppApi {

	/**
	 * 关闭 -- 没有提示
	 * 
	 * @return
	 */
	@PostMapping("/stop")
	public CompletableFuture<Result> stop() {
		Events.post(Event.EXIT);
		return CompletableFuture.completedFuture(Result.success());
	}
}
